#ifndef __FLAG_H__
#define __FLAG_H__
#include "cocos2d.h"
#include "gofgame/dungeonkeeper/ui/MessageViewDialog.h"
#include "gofgame/common/ui/MessageDialogType.h"
#include "gofgame/common/ui/MessageDialog.h"
#include "gofgame/dungeonkeeper/mapscene/MapLayer.h"

using namespace cocos2d;
using namespace gofgame::common::ui;
using namespace gofgame::dungeonkeeper::ui;
using namespace gofgame::dungeonkeeper::mapscene;

namespace gofgame {
	namespace dungeonkeeper {
		namespace mapscene {
			class Flag :public CCSprite ,public CCTargetedTouchDelegate{
			public:
				CCSprite *base;
				CCSprite *star1;
				CCSprite *star2;
				CCSprite *star3;
				static Flag  * create(MapLayer::LevelInfo);
				bool init(MapLayer::LevelInfo);
				~Flag();
				CCRect box;
				CCPoint getSetupPostion();
				int id;
				int dificulty;
				std::string levelName;
				std::string levelInfo;
				std::string levelTitle;
			public:	
				virtual bool ccTouchBegan(CCTouch *touch, CCEvent *event);  
				virtual void ccTouchMoved(CCTouch *touch, CCEvent *event);  
				virtual void ccTouchEnded(CCTouch *touch, CCEvent *event);
			private:
				void showLevelInfoBox();
				void onLevelInfoViewCloase(void* sender, DialogClosedEventArgs &e);
				CCPoint setupPostion;
				bool unlock;
			};
		}
	} 
}

#endif //__FLAG_H__
